package com.happy.qademo.websheet.repository;

import com.happy.qademo.websheet.entity.WorkBookEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import java.util.List;


@Repository
public interface WorkBookRepository extends JpaRepository<WorkBookEntity,String> {


    // @Query(value = "SELECT id, name, `options` " +
    //         "FROM workbook order by create_time desc", nativeQuery = true)
    @Query("SELECT w FROM WorkBookEntity w ORDER BY w.create_time DESC")
    List<WorkBookEntity> findAll();


}


